from django.urls import path, include
from manufacture_analysis import views
from rest_framework.routers import DefaultRouter

router = DefaultRouter()
# router.register(prefix="get_station_status", viewset=views.StationStatusViewSet)
# router.register(prefix="get_andon_call", viewset=views.AndonCallViewSet)
# router.register(prefix="get_andon_pull_calls", viewset=views.AndonPullCallsViewSet)
# router.register(prefix="get_equipment", viewset=views.EquipmentViewSet)
# router.register(prefix="get_Top20Shutdown", viewset=views.Top20ShutdownViewSet)
# router.register(prefix="get_LastCtStatistics", viewset=views.LastCtStatisticsViewSet)
# router.register(prefix="get_MachineFaultHistory", viewset=views.MachineFaultHistoryViewSet)
# router.register(prefix="get_ProductionHourly", viewset=views.ProductionHourlyViewSet)
# router.register(prefix="get_Schedule", viewset=views.ScheduleViewSet)
# router.register(prefix="get_ToolChangeLog", viewset=views.ToolChangeLogViewSet)
# router.register(prefix="get_Tool", viewset=views.ToolViewSet)

urlpatterns = [
    path("get_andon_call/", views.my_andonCall.as_view(), name="暗灯数据"),
    path("get_station_test/", views.test.as_view()),
    path("get_LastCtStatistics_page/", views.LastCtStatisticsView2.as_view()),
    path("get_MachineFaultHistory/", views.MachineFaultHistoryView.as_view(), name="设备停机数据"),
    path("get_station_status/", views.StationStatusView.as_view(), name="工位状态数据"),
    path("get_andon_pull_calls/", views.AndonPullCallsView.as_view(), name="工位状态数据"),
    path("get_equipment/", views.EquipmentView.as_view(), name="设备点位信息数据"),
    path("get_LastCtStatistics/", views.LastCtStatisticsView.as_view(), name="每小时设备循环时间节拍数据"),
    path("get_production_total_data/", views.production_totalView.as_view(), name="产量数据"),
    path("get_Top20Shutdown/", views.Top20ShutdownView.as_view(), name="Top20Shutdown数据"),
    path("get_ToolChangeLog/", views.ToolChangeLogView.as_view(), name="ToolChangeLog数据"),
    path("get_Schedule/", views.ScheduleView.as_view(), name="Schedule数据"),
    path("get_ProductionHourly/", views.ProductionHourlyView.as_view(), name="ProductionHourly数据"),
    path("get_ms_cycle_data/", views.ms_cycle_dataView.as_view(), name="机加工cycle数据"),
]
# 使用视图集编程 Viewset（写法三）
urlpatterns += router.urls
